<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>新闻分类管理</title>
    <link rel="stylesheet" th:href="@{/statics/css/common.css}" type="text/css">
</head>
<body>
<form th:action="@{/addNewsType}">
    <input type="text" name="typeName" placeholder="请输入新闻分类">
    <input type="submit" value="添加新闻分类">
</form>
<a th:href="@{/to/admin}">回到管理员首页</a>
<ul th:each="newstype : ${newsTypeList}">
    <li>
        <span th:text="${newstype.typeName}"></span>
        <a th:href="@{'/deleteNewsType/'+${newstype.id}}">删除</a>
    </li>
</ul>
</body>
</html>